package com.demo.job.anno.utils;

/**
 * @author peter
 * @date 2022/4/11 0:55
 */
public abstract class IJobHandler {


    /**
     * execute handler, invoked when executor receives a scheduling request
     *
     * @throws Exception
     */
    public abstract void execute() throws Exception;

    /**
     * execute handler, invoked when executor receives a scheduling request
     *
     * @throws Exception
     */
    public abstract void execute(Object ...args) throws Exception;

	/*@Deprecated
	public abstract ReturnT<String> execute(String param) throws Exception;*/

    /**
     * init handler, invoked when JobThread init
     */
    public void init() throws Exception {
        // do something
    }


    /**
     * destroy handler, invoked when JobThread destroy
     */
    public void destroy() throws Exception {
        // do something
    }

}
